package com.gxy.learn.web;

import com.gxy.learn.service.ProviderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RequestMapping("/provider")
@RestController
public class HelloWordController {

    @Autowired
    private ProviderService providerService;

    @GetMapping("/hello")
    public String hello(@RequestParam String name) {
        log.info("invoked name {} ", name);
        return "hello " + name;
    }

    @PostMapping("/insert")
    public String insert() {
        providerService.insertTesdt();
        return "ok";
    }


}
